-- GENERATED SPELL FOR [Crimson Initiate] --


function spell0_10420(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(17138,pUnit)
pUnit:RegisterEvent('Sorts_10420', 1500, 1)
end

function spell1_10420(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(17194,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10420', 1500, 1)
end

function spell2_10420(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(8362,pUnit)
pUnit:RegisterEvent('Sorts_10420', 22000, 1)
end

function Sorts_10420(pUnit, Event)
local choix_sorts_10420 = math.random(0, 2)
if choix_sorts_10420 == 0 then
pUnit:RegisterEvent('spell0_10420', 1, 1)
end
if choix_sorts_10420 == 1 then
pUnit:RegisterEvent('spell1_10420', 1, 1)
end
if choix_sorts_10420 == 2 then
pUnit:RegisterEvent('spell2_10420', 1, 1)
end
end

function mob10420_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10420', math.random(1500, 3000), 1)
end

function mob10420_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10420_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10420_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10420, 1, 'mob10420_Action')
RegisterUnitEvent(10420, 2, 'mob10420_Leave')
RegisterUnitEvent(10420, 3, 'mob10420_Kill')
RegisterUnitEvent(10420, 4, 'mob10420_Die')
